package com.wyz.note.mq.rabbit.consumer.receiver;

import com.wyz.note.mq.rabbit.consumer.constant.BaseConstant;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @Description: 消息接收监听类（主题）学生
 * @Author: wei yz
 * @Date: 2022/6/12 15:35
 */
@Component
@RabbitListener(queues = BaseConstant.student)
public class StudentTopicReceiver {

    @RabbitHandler
    public void process(Map testMessage) {
        System.out.println("学生（student）消费者收到消息  : " + testMessage.toString());
    }

    /**
     * 需要在服务端有一个队列存在，不然会启动不成功，会报找不到队列异常
     *
     *
     *
     */
    private void doc(){

    }
}
